// import List from "./01.列表渲染"
// import Ctr from "./02.受控组件&非受控"
import Up from "./04.状态提升"
import Com from "./05.组合"
import A from "./06.context跨组件传参"
import Por from "./07.portal"
import Modal from "./08.封装Modal组件/Modal"
import Calculator from "./温度转换案例/Calculator"
import LifeCircle from "./生命周期/LifeCircle"
//虚拟组件Fragment Fragment这个不会解析到dom结构中
import { Fragment } from "react"
import React from 'react'
class App extends React.Component {
    state = {
        visible: false
    }
    handleClick = () => {
        this.setState({
            visible: true
        })
    }
    //点击确定的处理函数
    handleOk = () => {
        console.log(123)
        this.setState({
            visible: false
        })
    }
    //点击取消的处理函数
    handleCancel = () => {
        this.setState({
            visible: false
        })
    }
    render() {
        let { visible } = this.state;
        return (
            //    <fieldset>
            //        <legend>App</legend>
            //         {/* <List/> */}
            //         {/* <Ctr/> */}
            //         <Up/>
            //    </fieldset>
            // <Calculator />
            // <LifeCircle/>
            // <Com sideBar={<del>不要998</del>} article={<i>只要9.8</i>}>


            // </Com>
            // <A/>
            // <Por/>
            <Fragment>
                <button onClick={this.handleClick}>点击显示模态框</button>
                <Modal
                    title={<h1>充值提示</h1>}
                    visible={visible} onOk={this.handleOk} onCancel={this.handleCancel}>
                    <h2>退钱1000000</h2>
                </Modal>
            </Fragment>
        )
    }
}
export default App